package composite;import java.util.Iterator;/** * Created by Administrator on 2018-11-1. */public class NullIterator implements Iterator {    public boolean hasNext() {        return false;    }    public Object next() {        return null;    }    public void remove() {        throw  new UnsupportedOperationException();    }}